<?php
class Category extends AppModel { 
       var $name = 'Category';
       var $actsAs = array('Tree'=> array('left'=>'left','right'=>'right') );
       //var $hasOne = array('CategoryContent');
       
       var $hasAndBelongsToMany=array(
        'Article' => array(
            'className' => 'Article',
            'joinTable' => 'category_datas',
            'foreignKey' => 'category_id',
            'associationForeignKey' => 'data_id',
            'unique' => true,
            'conditions' => "CategoryData.type='Article'",
            'fields' => '',
            'order' => 'data_id desc',
            'limit' => '15',
            'offset' => '',
            'finderQuery' => '',
            'deleteQuery' => '',
            'insertQuery' => '',
        ),
    );
} 